POV-Ray : Newsgroups : povray.programming : Smooth mesh 'bug' inverted normals (+Patch) : Re: Smooth mesh 'bug' inverted normals (+Patch) Server Time
1 May 2024 01:47:07 EDT (-0400)
  Re: Smooth mesh 'bug' inverted normals (+Patch)  
From: Jurjen
Date: 11 Aug 2002 06:35:11
Message: <web.3d563c38956bba3e2d1684350@news.povray.org>
>I think your change might have another side effect: it will always let
>rays go through the entire mesh, even if the area that has the reversed
>normal is in front of an area with a correct normal. I'm not sure
>though, I haven't applied this patch to see where it goes.

My patch lets the ray through only the triangle that has the inverted
normals. The inside triangle that is behind the current one will normally
have outside pointing normals and this patch will skip that triangle also.

If there is a normal triangle behind the second one (with at least 1 normal
pointing towards the current view point) then that triangle will still be
intersected and drawn.

When all the normals of a convex part of a mesh are pointing outwards then
there should not be any holes where they shouldn't be. But when the viewer
is inside the mesh the part of it that encloses the viewer will be totally
transparent (all the normals will be pointing away from the viewer).

I think this is the best solution but I have an alternative... and wrote it
also:
When a triangle has any normals pointing away from the viewer rotate these
normals towards the viewpoint till they are at an 90 degrees angle (can be
done with 2 VCross functions). This can only be done in the Mesh_Normal
function so it should be made aware of the ray->Direction.

But this alternative doens't provide a solution to the knive sharp shadows
around some of the triangles... these shadows are just as much of a pain to
my eyes as are the back bending normals towards the sides of the mesh.

So I choose my current patch as the best solution. I can provide the other
code if you want...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.